#include "NGameCamera.h"
#include "NComponent.h"

using namespace Game;

RTTI_DEFINITIONS(NGameCamera)

NGameCamera::NGameCamera(void)
	:Engine::NCamera()
{
}

NGameCamera::~NGameCamera(void)
{
}

void NGameCamera::Update(float gameTime)
{
	for(unsigned int i = 0; i < mComponents.size(); i++)
	{
		mComponents[i]->Update(gameTime);
	}
}

void NGameCamera::Initialize()
{
	NCamera::Initialize();
	for(unsigned int i = 0; i < mComponents.size(); i++)
	{
		mComponents[i]->Initialize(this);
	}
}

void NGameCamera::Deinitialize()
{
	NCamera::Deinitialize();
}

void NGameCamera::AddComponent(Game::NComponent* component)
{
	component->Initialize(this);
	mComponents.push_back(component);
}